from pathlib import Path

home = Path.home()
vim_file = f"{home}/.vimrc"
vim_config = """syntax enable
set confirm
set nocompatible
set t_Co=256
" set termguicolors
set autochdir
set relativenumber
set autoread
set cursorline

" 使用空格来替换Tab
set expandtab
" 设置所有的Tab和缩进为4个空格
set tabstop=4

set showmatch
set mat=2
set hlsearch
set ignorecase
set encoding=utf-8
set fileencodings=utf-8
set termencoding=utf-8
set laststatus=2

"""

with open(vim_file, 'w', encoding='utf-8') as f:
    f.write(vim_config)
